﻿package DrawEngine
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Loader;
	import flash.events.Event;
	import flash.events.ProgressEvent;
	import flash.geom.Rectangle;
	import flash.net.URLLoader;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	import flash.utils.ByteArray;
	import flash.utils.Dictionary;
	
	public class DrawManager
	{		
		public static var SourcePool:Dictionary = new Dictionary();
		public static var SinglePool:Dictionary = new Dictionary();
		
		private static var index:int = 0;
		
		public function DrawManager()
		{
			//构造函数
		}					
		
		public  static 	function AddSoucePool(_name:String,_data:BitmapData):void
		{
			SourcePool[_name] = _data;
		}
		
		public static  function GetBitmapData(_name:String):BitmapData
		{ 
			return SourcePool[_name];			    
		}
		
		public static function DelNode(_name:String):void
		{
			(SourcePool[_name] as BitmapData).dispose();
			SourcePool[_name] = null;
		}			
	}
}